import fetch from 'common/src/utils/fetch';
function graduateElectionelecSwitch(data) {//研究生选课结果处理开关
    return fetch({
        url: '/api/electionservice/elecSwitch',
        method: 'put',
        data: data
    });
}
function graduateReElectionelecSwitch(data){//研究生重修选课处理开关
    return fetch({
        url: '/api/electionservice/retakeCourse/setRetakeRules',
        method: 'put',
        data: data
    });
}

function queryReElectionSwitchTime(calendarId,projectId){//研究生重修选课处理开关时间查询
    return fetch({
        url:'/api/electionservice/retakeCourse/getRetakeSet?calendarId=' +
        calendarId+'&projectId='+projectId,
        method: 'get'
    });
}

function querySelectSwitchTime(calendarId,projectId){//研究生选课维护设置开关时间查询
    return fetch({
        url:'/api/electionservice/elecSwitch/getSwitch?calendarId=' +
        calendarId+'&projectId='+projectId,
        method: 'get'
    });
}

export default {
    graduateElectionelecSwitch,
    graduateReElectionelecSwitch,
    queryReElectionSwitchTime,
    querySelectSwitchTime
}